import { LOCAL_TOKEN,LOCAL_BTOKEN,LOCAL_ATOKEN } from "./constants.js"
/**
 * 获取本地存储的token
 */
export const getLocalToken = () => localStorage.getItem(LOCAL_TOKEN) || '';
export const getLocalBToken = () => localStorage.getItem(LOCAL_BTOKEN) || '';
export const getLocalAToken = () => localStorage.getItem(LOCAL_ATOKEN) || '';
/**
 * 将token存储于本地
 */
export const setLocalToken = (token) => localStorage.setItem(LOCAL_TOKEN, token);
export const setLocalBToken = (token) => localStorage.setItem(LOCAL_BTOKEN, token);
export const setLocalAToken = (token) => localStorage.setItem(LOCAL_ATOKEN, token);

export const removeLocalToken = () => localStorage.removeItem(LOCAL_TOKEN);
export const removeLocalBToken = () => localStorage.removeItem(LOCAL_BTOKEN);
export const removeLocalAToken = () => localStorage.removeItem(LOCAL_ATOKEN);